﻿using System;
using System.Collections.Generic;
using System.Text;


using YouHP.Model;
using YouHP.BLL;
using YouHP.Utility;

namespace YouHP.Pages.Member
{
    public class ListPatientTreatment : PatientBasePage
    {
        protected const int PageSize = 15;

        protected int TreatmentRecordCount { get; set; }

        protected int _UsingTreatmentCount;
        protected int UsingTreatmentCount { get { return _UsingTreatmentCount; } }
        protected List<PatientTreatmentInfo> UsingTreatmentList { get; set; }

        protected int _StoppedTreatmentCount;
        protected int StoppedTreatmentCount { get { return _StoppedTreatmentCount; } }
        protected List<PatientTreatmentInfo> StoppedTreatmentList { get; set; }



        protected override void ShowPage()
        {
            base.ShowPage();
            if (ErrorCount > 0) return;

            HandleCommon();

            if (IsPost) HandlePost();
            else HandleGet();
        }

        protected void HandleCommon()
        {
        }

        protected void HandlePost()
        {
           
        }

        protected void HandleGet()
        {
           /* UsingTreatmentList = PatientTreatmentBLL.Instance.GetAllCurUsedTreatments(PRInfo.Id);
            StoppedTreatmentList = PatientTreatmentBLL.Instance.GetAllCurNoUsedTreatments(PRInfo.Id);
            */
            int action = RequestTools.GetQueryInt("action",-1);
            if (action == 1)
                PatientBLL.Instance.MakeGraphTreatment(PRInfo.Id);

        }
    }
}
